package com.sec.android.app.myfiles.module.cloud;

import com.samsung.android.sdk.slinkcloud.CloudGatewayMediaStore;
import com.sec.android.app.myfiles.provider.DbTableInfo;

public class CloudDbTableInfo extends DbTableInfo {

    public static final String COLUMN_NAME_FILE_ID = "source_media_id";
    public static final String COLUMN_NAME_PARENT_ID = "parent_cloud_id";

    private static CloudDbTableInfo mInstance = null;

    public static DbTableInfo getInstance() {
        if (mInstance == null) {
            mInstance = new CloudDbTableInfo();
        }
        return mInstance;
    }

    private CloudDbTableInfo() {
        // String extQuery = "LOWER ( replace( " +
        // CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.DISPLAY_NAME +
        // ", rtrim( "
        // + CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.DISPLAY_NAME
        // + ", replace ("
        // + CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.DISPLAY_NAME
        // + ", '.', '' ) ), '') ) AS ext";
        mTableColumn.add(new DB_Column(COLUMN_ID.ID, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns._ID, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.NAME, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.DISPLAY_NAME, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.SIZE, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.SIZE, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.DATE, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.LAST_MODIFIED, ""));

        mTableColumn.add(new DB_Column(COLUMN_ID.EXT, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.MIME_TYPE, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.MEDIA_ID, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.MEDIA_ID, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.FILE_ID, CloudGatewayMediaStore.FileBrowser.FileBrowserColumns.FILE_ID, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.DEVICE_ID, CloudGatewayMediaStore.MediaColumns.DEVICE_ID, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.ALTERNATIVE_LINK, CloudGatewayMediaStore.MediaColumns.FULL_URI, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.ITEM_COUNT, CloudGatewayMediaStore.Files.FileColumns.CHILD_CNT, ""));
        mTableColumn.add(new DB_Column(COLUMN_ID.TRASH_PROCESSING, CloudGatewayMediaStore.Files.FileColumns.TRASH_PROCESSING, ""));
        // mTableColumn.add(new DB_Column(COLUMN_ID.DIR_COUNT,
        // CloudGatewayMediaStore.Files.FileColumns.CHILD_DIR_CNT, ""));
        // mTableColumn.add(new DB_Column(COLUMN_ID.EXT, "ext", null,
        // extQuery));
    }

    @Override
    public String getTableName() {
        final String tableName = "cloud";
        return tableName;
    }

    @Override
    public boolean isRealDb() {
        return false;
    }
}
